From 8690d19f032c6ca5fd7f783370f8e2d584f6ae62 Mon Sep 17 00:00:00 2001 From: Alexander Larsson Date: Thu, 5 Feb 2009 17:01:21 +0100 Subject: [PATCH] Don't touch private->parent after its been change The backend reparent may change private->parent, so we must use the old saved value. --- gdk/gdkwindow.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gdk/gdkwindow.c b/gdk/gdkwindow.c index 1245e5702f..7a5431d5b5 100644 --- a/gdk/gdkwindow.c +++ b/gdk/gdkwindow.c @@ -1150,8 +1150,8 @@ gdk_window_reparent (GdkWindow *window, new_parent_private = (GdkWindowObject *)new_parent; } - if (private->parent) - private->parent->children = g_list_remove (private->parent->children, window); + if (old_parent) + old_parent->children = g_list_remove (old_parent->children, window); private->parent = new_parent_private; private->x = x; -- 2.30.2